package dao;

import domain.User;

import java.util.List;
import java.util.Map;

//用户操作的dao
public interface UserDao {


    void add(User user);

    void delete(int id);

    void update(User user);

    List<User> findAll();

    User findById(int id);


    //查询总记录数
    int findTotalCount(Map<String, String[]> condition);


    //分页查询每页记录
    List<User> findByPage(int start, int rows, Map<String, String[]> condition);

    User findUserByUsernameAndPassword(String username, String password);
}
